#!/bin/bash
today=`date +%Y%m%d`
company=$1
jid=$2
mkdir -p data/$today/$company
cd data/$today/$company
../../../get_job.sh $jid 1
cd ../../..
grep -h "r=job" data/$today/$company/page* | perl -pe 's/<[^>]*>//g' | perl -pe 's/^\s*//g' | sort -u > data/$today/$company/alljobs
cat data/$today/$company/alljobs | wc -l > data/$today/$company/jobnum
jobcnt=`cat data/$today/$company/jobnum`
chmod 777 data/$today/$company/* 
echo "Job Count $jobcnt"
